<%--
  Created by IntelliJ IDEA.
  User: zwb
  Date: 2022/11/21
  Time: 下午6:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
</head>
<body>
<h2>航空班次查询信息</h2>
<%--action="${pageContext.request.contextPath}/find"--%>
  <form  method="post">
      <label>航空班次查询：</label>
      <input type="text" name="id">
      <input type="submit" value="提交">
  </form>

<script>
    $('input[type="submit"]').click(function (){

        var val = $('input[type="text"]').val();/*获取表单值*/
        if(val=="" || val==null){
            alert("航空班次查询不能为空!")
        }else {
            $("form").attr("action","${pageContext.request.contextPath}/find")
        }

    })
</script>
</body>
</html>
